package com.im.web.core.controller;

import com.im.web.core.propertiy.CustomDateEditor;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.InitBinder;

import java.util.Date;

/** @author gongym */
@Component
@EnableGlobalMethodSecurity(prePostEnabled = true)
public class BaseController {
  @InitBinder
  public void init(WebDataBinder binder) {
    binder.registerCustomEditor(Date.class, new CustomDateEditor());
  }
}
